package com.duguo.dynamicmvc.model.validator;

import com.duguo.dynamicmvc.model.validator.exception.SingleFieldValidationException;
import com.duguo.dynamicmvc.model.validator.exception.ValidationException;
import com.duguo.dynamicmvc.model.validator.exception.ValidationResult;

public abstract class AbstractValidator  implements Validator{
	
	private String _name;

	public void validate(Object value) throws ValidationException {
		throw new SingleFieldValidationException(new ValidationResult(value,this));
	}

	public String getName() {
		return _name;
	}

	public void setName(String name) {
		_name = name;
	}
	
	

}